//
//  GBButton.m
//  弹出框动画
//
//  Created by guobin on 15/10/2.
//  Copyright © 2015年 郭斌. All rights reserved.
//

#import "GBButton.h"

@interface GBButton()

@end

@implementation GBButton

#pragma mark - 自定义初始化方法
-(instancetype)initWithFrame:(CGRect)frame withTitle:(NSString *)title
{
    self = [super initWithFrame:frame];
    if(self)
    {
        [self setTitle:title forState:UIControlStateNormal];
        [self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        self.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
        self.titleLabel.font = [UIFont systemFontOfSize:15];
        [self addTarget:self action:@selector(BtnClick:) forControlEvents:UIControlEventTouchUpInside];
    }
    return self;
}

#pragma mark - 按钮点击的代理
-(void)BtnClick:(UIButton *)sender
{
    [self.delegate100 btnClick:sender];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
